package com.hospital.wx.service.Impl;

import com.hospital.wx.dao.LikesDao;
import com.hospital.wx.pojo.Likes;
import com.hospital.wx.service.LikesService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

@Service
@Slf4j
public class LikesServiceImpl implements LikesService {

    @Autowired
    private LikesDao likesDao;

    @Override
    public int addLikes(Likes likes) {
        return likesDao.addLikes(likes);
    }

    @Override
    @Transactional
    public int cancelLikes(Integer id) {
        return likesDao.cancelLikes(id);
    }

    @Override
    public Integer selectId(Map param) {
        return likesDao.selectId(param);
    }

}
